const express = require("express")
const router = express.Router()

// get接口
router.get('/get', (req, res) => {
  res.send({
    status: 1,
    code: 200,
    msg: '请求成功',
    data: req.query
  })
})

// post接口
router.post('/user', (req, res) => {
  const body = req.body
  res.send({
    status: 1,
    code: 200,
    msg: '请求成功',
    data: body
  })
})
// delete接口
router.delete('/delete/:id', (req, res) => {
  const params = req.params
  res.send({
    status: 1,
    code: 200,
    msg: params,
  })
})

module.exports = router
